#!/bin/bash
# Zaitan Module - Nagios Install
# Zaitan Team <http://code.google.com/p/zaitan/>
# Script Tirado desse link http://www.vivaolinux.com.br/artigos/verArtigo.php?codigo=6788&pagina=1


RMOD_ENGINE='1.0'
RMOD_CATEGORY='Software'
RMOD_SUBCATEGORY='Servers'
RMOD_NAME='Nagios'
RMOD_AUTHOR='Zaitan Team'
RMOD_VERSION='2.9'
RMOD_DESCRIPTION='Installs Nagios'



# Install Nagios

echo Running $RMOD_NAME...
#/usr/lib/zaitan/modulo/mod-checkInstall

cd /usr/share/zaitan

apt-get update
apt-get -y install php5-gd libgd-dev php5-mysql libsnmp9-dev libc6-dev libmysqlclient15-dev build-essential
useradd -m zabbix

wget -c http://www.zabbix.com/downloads/1.4.1/zabbix_all_1.4.1.ubuntu_6_10.64bit.mysql.i386.tar.gz
tar zxvf zabbix_all_1.4.1.ubuntu_6_10.64bit.mysql.i386.tar.gz

wget -c http://www.zabbix.com/downloads/1.4.1/zabbix_all_1.4.1.ubuntu_6_10.64bit.sqlite.i386.tar.gz
wget -c http://www.zabbix.com/downloads/ZABBIX%20Manual%20v1.4.pdf





echo $RMOD_NAME Finibashed...

##Logs
echo $RMOD_NAME-$RMOD_VERSION | tee -a /usr/share/zaitan/logs
/usr/lib/zaitan/modulo/mod-logs
##

exit 0
